#define ElemType int

typedef struct ListNode List_Node;

#include "common.h"

int maxArea(int* height, int heightSize);

int main()
{
	return 0;
}

int maxArea(int* height, int heightSize)
{
	int lo = 0, hi = heightSize - 1,
		ans = 0;
	while (lo < hi) {
		int cur_area = (hi - lo) * (height[hi] < height[lo] ? height[hi] : height[lo]);
		ans = ans > cur_area ? ans : cur_area;

		if (height[lo] <= height[hi])
			lo++;
		else
			hi--;
	}

	return ans;
}
